package com.iris.live.services.data.models;

import javax.persistence.*;

/**
 * 市场月度综合报表填报部分
 * Created by HangLiu on 2017/9/26.
 */
@Entity
@Table(name = "t_market_integrated_report", schema = "iris_dch_dev", catalog = "")
public class MarketIntegratedReportModel {
    private Integer id;
    //许可
    private String permit;
    //统计日期  201709
    private String statDate;
    //售后厂家到账支援金
    private Double afterSaleActivitieFactorySupportFunds;
    //售后当月活动执行费用
    private Double afterSaleActivitieExecuteExpenses;
    //售后当月活动实际支付
    private Double afterSaleActivitiePayment;
    //售后当月活动展开数量（个）
    private Integer afterSaleActivitiesNum;
    //售后厂家到账支援金
    private Double afterSaleMediaFactorySupportFunds;
    //售后当月广宣执行费用
    private Double afterSaleMediaPublicityExpenses;
    //售后当月媒体实际支付
    private Double afterSaleMediaActuallyPayment;
    //销售厂家到账支援金
    private Double sellActivitieFactorySupportFunds;
    //销售当月活动执行费用
    private Double sellActivitieExecuteExpenses;
    //销售当月活动实际支付
    private Double sellActivitiePayment;
    //销售当月活动展开数量（个）
    private Integer sellActivitiesNum;
    //销售厂家到账支援金
    private Double sellMediaFactorySupportFunds;
    //销售当月广宣执行费用
    private Double sellMediaPublicityExpenses;
    //销售当月媒体实际支付
    private Double sellMediaActuallyPayment;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "permit", nullable = false, length = 16)
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "stat_date", nullable = false, length = 6)
    public String getStatDate() {
        return statDate;
    }

    public void setStatDate(String statDate) {
        this.statDate = statDate;
    }

    @Basic
    @Column(name = "after_sale_activitie_factory_support_funds", nullable = true, precision = 2)
    public Double getAfterSaleActivitieFactorySupportFunds() {
        return afterSaleActivitieFactorySupportFunds;
    }

    public void setAfterSaleActivitieFactorySupportFunds(Double afterSaleActivitieFactorySupportFunds) {
        this.afterSaleActivitieFactorySupportFunds = afterSaleActivitieFactorySupportFunds;
    }

    @Basic
    @Column(name = "after_sale_activitie_execute_expenses", nullable = true, precision = 2)
    public Double getAfterSaleActivitieExecuteExpenses() {
        return afterSaleActivitieExecuteExpenses;
    }

    public void setAfterSaleActivitieExecuteExpenses(Double afterSaleActivitieExecuteExpenses) {
        this.afterSaleActivitieExecuteExpenses = afterSaleActivitieExecuteExpenses;
    }

    @Basic
    @Column(name = "after_sale_activitie_payment", nullable = true, precision = 2)
    public Double getAfterSaleActivitiePayment() {
        return afterSaleActivitiePayment;
    }

    public void setAfterSaleActivitiePayment(Double afterSaleActivitiePayment) {
        this.afterSaleActivitiePayment = afterSaleActivitiePayment;
    }

    @Basic
    @Column(name = "after_sale_activities_num", nullable = true)
    public Integer getAfterSaleActivitiesNum() {
        return afterSaleActivitiesNum;
    }

    public void setAfterSaleActivitiesNum(Integer afterSaleActivitiesNum) {
        this.afterSaleActivitiesNum = afterSaleActivitiesNum;
    }

    @Basic
    @Column(name = "after_sale_media_factory_support_funds", nullable = true, precision = 2)
    public Double getAfterSaleMediaFactorySupportFunds() {
        return afterSaleMediaFactorySupportFunds;
    }

    public void setAfterSaleMediaFactorySupportFunds(Double afterSaleMediaFactorySupportFunds) {
        this.afterSaleMediaFactorySupportFunds = afterSaleMediaFactorySupportFunds;
    }

    @Basic
    @Column(name = "after_sale_media_publicity_expenses", nullable = true, precision = 2)
    public Double getAfterSaleMediaPublicityExpenses() {
        return afterSaleMediaPublicityExpenses;
    }

    public void setAfterSaleMediaPublicityExpenses(Double afterSaleMediaPublicityExpenses) {
        this.afterSaleMediaPublicityExpenses = afterSaleMediaPublicityExpenses;
    }

    @Basic
    @Column(name = "after_sale_media_actually_payment", nullable = true, precision = 2)
    public Double getAfterSaleMediaActuallyPayment() {
        return afterSaleMediaActuallyPayment;
    }

    public void setAfterSaleMediaActuallyPayment(Double afterSaleMediaActuallyPayment) {
        this.afterSaleMediaActuallyPayment = afterSaleMediaActuallyPayment;
    }

    @Basic
    @Column(name = "sell_activitie_factory_support_funds", nullable = true, precision = 2)
    public Double getSellActivitieFactorySupportFunds() {
        return sellActivitieFactorySupportFunds;
    }

    public void setSellActivitieFactorySupportFunds(Double sellActivitieFactorySupportFunds) {
        this.sellActivitieFactorySupportFunds = sellActivitieFactorySupportFunds;
    }

    @Basic
    @Column(name = "sell_activitie_execute_expenses", nullable = true, precision = 2)
    public Double getSellActivitieExecuteExpenses() {
        return sellActivitieExecuteExpenses;
    }

    public void setSellActivitieExecuteExpenses(Double sellActivitieExecuteExpenses) {
        this.sellActivitieExecuteExpenses = sellActivitieExecuteExpenses;
    }

    @Basic
    @Column(name = "sell_activitie_payment", nullable = true, precision = 2)
    public Double getSellActivitiePayment() {
        return sellActivitiePayment;
    }

    public void setSellActivitiePayment(Double sellActivitiePayment) {
        this.sellActivitiePayment = sellActivitiePayment;
    }

    @Basic
    @Column(name = "sell_activities_num", nullable = true)
    public Integer getSellActivitiesNum() {
        return sellActivitiesNum;
    }

    public void setSellActivitiesNum(Integer sellActivitiesNum) {
        this.sellActivitiesNum = sellActivitiesNum;
    }

    @Basic
    @Column(name = "sell_media_factory_support_funds", nullable = true, precision = 2)
    public Double getSellMediaFactorySupportFunds() {
        return sellMediaFactorySupportFunds;
    }

    public void setSellMediaFactorySupportFunds(Double sellMediaFactorySupportFunds) {
        this.sellMediaFactorySupportFunds = sellMediaFactorySupportFunds;
    }

    @Basic
    @Column(name = "sell_media_publicity_expenses", nullable = true, precision = 2)
    public Double getSellMediaPublicityExpenses() {
        return sellMediaPublicityExpenses;
    }

    public void setSellMediaPublicityExpenses(Double sellMediaPublicityExpenses) {
        this.sellMediaPublicityExpenses = sellMediaPublicityExpenses;
    }

    @Basic
    @Column(name = "sell_media_actually_payment", nullable = true, precision = 2)
    public Double getSellMediaActuallyPayment() {
        return sellMediaActuallyPayment;
    }

    public void setSellMediaActuallyPayment(Double sellMediaActuallyPayment) {
        this.sellMediaActuallyPayment = sellMediaActuallyPayment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MarketIntegratedReportModel that = (MarketIntegratedReportModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (statDate != null ? !statDate.equals(that.statDate) : that.statDate != null) return false;
        if (afterSaleActivitieFactorySupportFunds != null ? !afterSaleActivitieFactorySupportFunds.equals(that.afterSaleActivitieFactorySupportFunds) : that.afterSaleActivitieFactorySupportFunds != null)
            return false;
        if (afterSaleActivitieExecuteExpenses != null ? !afterSaleActivitieExecuteExpenses.equals(that.afterSaleActivitieExecuteExpenses) : that.afterSaleActivitieExecuteExpenses != null)
            return false;
        if (afterSaleActivitiePayment != null ? !afterSaleActivitiePayment.equals(that.afterSaleActivitiePayment) : that.afterSaleActivitiePayment != null)
            return false;
        if (afterSaleActivitiesNum != null ? !afterSaleActivitiesNum.equals(that.afterSaleActivitiesNum) : that.afterSaleActivitiesNum != null)
            return false;
        if (afterSaleMediaFactorySupportFunds != null ? !afterSaleMediaFactorySupportFunds.equals(that.afterSaleMediaFactorySupportFunds) : that.afterSaleMediaFactorySupportFunds != null)
            return false;
        if (afterSaleMediaPublicityExpenses != null ? !afterSaleMediaPublicityExpenses.equals(that.afterSaleMediaPublicityExpenses) : that.afterSaleMediaPublicityExpenses != null)
            return false;
        if (afterSaleMediaActuallyPayment != null ? !afterSaleMediaActuallyPayment.equals(that.afterSaleMediaActuallyPayment) : that.afterSaleMediaActuallyPayment != null)
            return false;
        if (sellActivitieFactorySupportFunds != null ? !sellActivitieFactorySupportFunds.equals(that.sellActivitieFactorySupportFunds) : that.sellActivitieFactorySupportFunds != null)
            return false;
        if (sellActivitieExecuteExpenses != null ? !sellActivitieExecuteExpenses.equals(that.sellActivitieExecuteExpenses) : that.sellActivitieExecuteExpenses != null)
            return false;
        if (sellActivitiePayment != null ? !sellActivitiePayment.equals(that.sellActivitiePayment) : that.sellActivitiePayment != null)
            return false;
        if (sellActivitiesNum != null ? !sellActivitiesNum.equals(that.sellActivitiesNum) : that.sellActivitiesNum != null)
            return false;
        if (sellMediaFactorySupportFunds != null ? !sellMediaFactorySupportFunds.equals(that.sellMediaFactorySupportFunds) : that.sellMediaFactorySupportFunds != null)
            return false;
        if (sellMediaPublicityExpenses != null ? !sellMediaPublicityExpenses.equals(that.sellMediaPublicityExpenses) : that.sellMediaPublicityExpenses != null)
            return false;
        if (sellMediaActuallyPayment != null ? !sellMediaActuallyPayment.equals(that.sellMediaActuallyPayment) : that.sellMediaActuallyPayment != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (statDate != null ? statDate.hashCode() : 0);
        result = 31 * result + (afterSaleActivitieFactorySupportFunds != null ? afterSaleActivitieFactorySupportFunds.hashCode() : 0);
        result = 31 * result + (afterSaleActivitieExecuteExpenses != null ? afterSaleActivitieExecuteExpenses.hashCode() : 0);
        result = 31 * result + (afterSaleActivitiePayment != null ? afterSaleActivitiePayment.hashCode() : 0);
        result = 31 * result + (afterSaleActivitiesNum != null ? afterSaleActivitiesNum.hashCode() : 0);
        result = 31 * result + (afterSaleMediaFactorySupportFunds != null ? afterSaleMediaFactorySupportFunds.hashCode() : 0);
        result = 31 * result + (afterSaleMediaPublicityExpenses != null ? afterSaleMediaPublicityExpenses.hashCode() : 0);
        result = 31 * result + (afterSaleMediaActuallyPayment != null ? afterSaleMediaActuallyPayment.hashCode() : 0);
        result = 31 * result + (sellActivitieFactorySupportFunds != null ? sellActivitieFactorySupportFunds.hashCode() : 0);
        result = 31 * result + (sellActivitieExecuteExpenses != null ? sellActivitieExecuteExpenses.hashCode() : 0);
        result = 31 * result + (sellActivitiePayment != null ? sellActivitiePayment.hashCode() : 0);
        result = 31 * result + (sellActivitiesNum != null ? sellActivitiesNum.hashCode() : 0);
        result = 31 * result + (sellMediaFactorySupportFunds != null ? sellMediaFactorySupportFunds.hashCode() : 0);
        result = 31 * result + (sellMediaPublicityExpenses != null ? sellMediaPublicityExpenses.hashCode() : 0);
        result = 31 * result + (sellMediaActuallyPayment != null ? sellMediaActuallyPayment.hashCode() : 0);
        return result;
    }
}
